﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using DataAccess;
namespace XuaNhapKho
{
    public partial class ChiTietHoaDon : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["User"] == null)
                {
                    Response.Redirect("/Default.aspx");
                }
                else
                {
                    
                }

                loadGridView();


               


            }
        }

        public void loadGridView()
        {
            if (Request.QueryString["id"] != null)
            {
                int type = int.Parse(Request.QueryString["type"].ToString());
                grvChiTietHoaDon.DataSource = HoaDonDAO.GetDetail(Request.QueryString["id"].ToString(),type);
                grvChiTietHoaDon.DataBind();
            }
        }
        

    }
}